#ifndef HISTORYSESSION_H_
#define HISTORYSESSION_H_

#include "DBType.h"
#include "HistoryEntry.h"
#include <vector>

namespace Impp
{

class HistoryEntry;


class HistorySession
{
private:
	db_id id;
	wxDateTime sessionStart;
	wxDateTime sessionEnd;
	
public:
	HistorySession(db_id id, const wxDateTime & sessionStart, const wxDateTime & sessionEnd);
	virtual ~HistorySession();
	
	bool operator==(HistorySession& frame);
	db_id getId();
	void updateSessionEnd(const wxDateTime & sessionEnd);
	wxTimeSpan getTimeSinceLastMessage(const wxDateTime & time);
	void getHistoryEntries(std::vector<HistoryEntry*> & out);
	wxDateTime getSessionStart();
	HistoryEntry* getLastEntry();
	
};

/*
class HistorySessionCached
{
private:
	std::vector<HistoryEntry*> entries;
	
public:
	HistorySession(db_id id, const wxDateTime & sessionStart, const wxDateTime & sessionEnd);
	virtual ~HistorySession();
	
	db_id getId();
	void updateSessionEnd(const wxDateTime & sessionEnd);
	wxTimeSpan getTimeSinceLastMessage(const wxDateTime & time);
	
	void getHistoryEntries(std::vector<HistoryEntry*> & out);
	
};
*/

}


#endif /*HISTORYSESSION_H_*/
